package com.diao.myhub.config;

//import io.swagger.v3.oas.models.OpenAPI;
//import io.swagger.v3.oas.models.info.Contact;
//import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


//@Configuration
public class SwaggerConfig implements WebMvcConfigurer {
    //@Bean
    //public Docket docket(ApiInfo apiInfo,Environment environment) {
    //    // 获取当前环境
    //    Profiles isDev = Profiles.of("dev");
    //    boolean flag = environment.acceptsProfiles(isDev);
    //    return new Docket(DocumentationType.OAS_30)
    //            // 根据环境开启或关闭swagger Docket
    //            .enable(flag)
    //            // 设置组名
    //            .apiInfo(apiInfo)
    //            .select().apis(RequestHandlerSelectors.
    //                            basePackage("com.diao.myhub.controller")).build();
    //}
    //@Bean
    //public OpenAPI apiInfo(){
    //    return new OpenAPI().info(new Info()
    //            .contact(new Contact().email("2366880229@qq.com"))
    //            .description("myHub")
    //            .title("myhub社区测试"));
    //
    //}
}
